/*
 * DataAcquisition.h
 *
 *  Created on: 2021年11月19日
 *      Author: CameronLee
 */

#ifndef INC_DATAACQUISITION_H_
#define INC_DATAACQUISITION_H_

#include "main.h"
#include "adc.h"
#include "dma.h"
#include "cmsis_os.h"
#include "GX18B20/gx18b20.h"
#include "temp_control.h"
#include "usbd_cdc_if.h"
#include "usart.h"

extern  volatile uint16_t ADC_ConvertedValue;

extern volatile float Deta_Enr_BOX ;
#define MAX_DATA_SIZE 10
typedef struct
{
	uint8_t Data_First;
	uint8_t Data_Kind;   //0xA0数据           0x50命令
	uint8_t Data_Length;
	uint8_t Data[MAX_DATA_SIZE];
	uint8_t Data_End;
}Data_Packet_TypeDef;





uint8_t BeginToAcquireADCValue(void);
uint8_t StopAcquiringADCValue(void);
uint8_t DataAcquireTask(void);

uint8_t Data_Packet_Send(float enr_temr,float box_temp,
						float target,uint16_t ADC_Value);












#endif /* INC_DATAACQUISITION_H_ */
